package com.titan.domain;

import java.io.Serializable;
import javax.persistence.*;

/**
 * Entity implementation class for Entity: Cabin
 *
 */
@Entity
@Table(name="Cabin")
public class Cabin implements Serializable {

	private static final long serialVersionUID = 1L;

	private int id;
	private String name;
	private int deckLevel;
	private Ship ship;
	private int bedCount;
	
	@TableGenerator(name="CABIN_GENERATOR",
			table="GENERATOR_TABLE",
			pkColumnName="PRIMARY_KEY_COLUMN",
			valueColumnName="VALUE_COLUMN",
			pkColumnValue="CABIN_ID",
			allocationSize=5)
	
	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator="CABIN_GENERATOR")
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name="NAME")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name="DECK_LEVEL")
	public int getDeckLevel() {
		return deckLevel;
	}
	public void setDeckLevel(int deckLevel) {
		this.deckLevel = deckLevel;
	}
	
	@Column(name="SHIP_ID")
	public Ship getShip() {
		return ship;
	}
	public void setShip(Ship ship) {
		this.ship = ship;
	}
	
	@Column(name="BED_COUNT")
	public int getBedCount() {
		return bedCount;
	}
	public void setBedCount(int bedCount) {
		this.bedCount = bedCount;
	}
}
